package com.ysy.logistics.entities.supplier.dto;

import com.ysy.logistics.entities.supplier.SupOrder;
import com.ysy.logistics.entities.supplier.SupOrderGoods;
import lombok.Data;

import java.util.List;

/**
 * @ClassDescription:
 * @Author:姚斯羽
 * @Create:2025/3/28 9:25
 **/
@Data
public class SupOrderDto extends SupOrder {

    private List<SupOrderGoods> goodsList;

    /**
     * 获取SupOrder对象
     * @return SupOrder对象
     */
    public SupOrder toSupOrder(){
        SupOrder supOrder = new SupOrder();
        supOrder.setId(this.getId());
        supOrder.setSupplierId(this.getSupplierId());
        supOrder.setSupplierName(this.getSupplierName());
        supOrder.setTotalPrice(this.getTotalPrice());
        supOrder.setOrderStatus(this.getOrderStatus());
        supOrder.setExpressId(this.getExpressId());
        supOrder.setPurchaser(this.getPurchaser());
        supOrder.setRemark(this.getRemark());
        supOrder.setStatus(this.getStatus());
        supOrder.setVersion(this.getVersion());
        supOrder.setDeleted(this.getDeleted());
        supOrder.setCreateTime(this.getCreateTime());
        supOrder.setNum(this.getNum());

        return supOrder;
    }


}
